home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Util / M / MacShell 0.53b.sit / MacShell 0.53b / MacShell 0.53b.rsrc / help_5247_tail < prev    next >
Encoding:
Text File  |  1995-03-07  |  1.5 KB  |  26 lines

  1. tail - Echo the bottom of the input to the output.
  2.  
  3. SYNTAX
  4.    tail [ [+-][kb] n1] [filename...]
  5.  
  6. DESCRIPTION
  7.  
  8. The command "tail" opens data forks of files whose names are given as arguments, and places the end of their contents on standard output.  If no arguments are given, standard input will be used instead.
  9.  
  10. By default, tail copies the last 200 bytes from the end of the input to the output, but this behavior can be changed if the user supplies one of the four options ("-b", "-k", "+b", "+k") followed by a positive integer on the command line.  An integer (n1) following an option with "b" will be interpreted as a number of bytes, while an integer following an option with "k" will be interpreted as kilobytes.  If a "b" or "k" is preceeded with "-", the n1 bytes or kilobytes to be copied to the output will be counted from the end of the input.  If the "b" or "k" is preceeded with "+" the bytes/kilobytes will be counted from the beginning.  The options are mutually exclusive.  Supplying two or more in one command generates an error.
  11.  
  12. The maximum numeric argument here is 32767, thus the maximum output is 32767 kilobytes.
  13.  
  14. EXAMPLES
  15.  
  16. A 1400 kilobyte data fork can be separated into two 700KB segments as follows:
  17.      head -k700 input.file > segment.1
  18.      tail +k700 input.file > segment.2
  19.  
  20. Likewise, a 1400 kilobyte resource fork could be operated on thus:
  21.      cat -r input.file | head -k700 > res.seg.1
  22.      cat -r input.file | tail +k700 > res.seg.2
  23.  
  24. SEE ALSO
  25.  
  26.         cat, head